change os.rename to shutil.move in two more places to allow crossing of file system boundaries