Added unit test for "overwrite file on rename/move"

Also fixed "rename" unit test that was ready the result out of the wrong
file.