Fix relocation of directories in the MinGW build.