Use shutil.move instead of os.rename to fix non-empty directory cases