Fix cache on windows

If the file already exists, on windows, the rename causes an OSError
File Already Exists on the os.rename call

This sanely handles that issue