Improve rename behavior on Windows