Redmine/6027

Note: filestat is documented to not support "type" on Windows - which is odd (Windows surely knows at least about a subset of types). So this needs testing, and possibly skipping, on Windows.