BUG: fix safe_write on windows when dst already exists.

This fixes safe_write to not fail when the destination fail already exists.