open: fix opening directory on mingw