Fix race with rename-file etc. with dir NEWNAME