Some backends (eg onedrive) will throw an error if we rename over an existing file and some (drive) will create a duplicate. This patch checks to see if the destination exists and removes it or returns an error as appropriate. Fixes #4293