mingw: add fallback for rmdir in case directory is in use