final tested os.rename fix