Merge pull request #792 from nico/statdir

try to fix stat()ing directories on windows in statcache code