changed to use mingw_stat(), mingw_lstat() and mingw_fstat().