Rename renames the file from src to dst. If src and dst can't be renamed
regularly, the data is copied from src to dst. dst will be overwritten
if it already exists. src will be removed after all data has been copied
successfully. Both files exist during copying.