Fix renaming for different files with same name.