mingw: try to delete target directory before renaming