Make it smarter about renaming in the same directory.