Ensure that we remove the old file when we rename

Previously if you did 2 file renames in a row, you will not remove the previous file.

i.e.

1. rename a file
2. rename the same file again  (this will actually copy the file instead of renaming)