Redmine #4809: Filestat windows fixes + test fixes