Renaming works properly for current directory, but no other directories