try to fix stat()ing directories on windows