Merge pull request #1421 from moroten/revert-for-appveyor-1

Revert "Fix stat when subdirectory is a file"