Fix bug in recursive deletion after renaming a file