gh-84419: Fix the execute permissions in os.stat() on Windows (GH-155392)

Windows strips trailing dots and spaces from the last component of the path,
so os.stat('spam.bat ') opened the same file as os.stat('spam.bat'), but did
not set the execute permissions in st_mode, because the extension did not
match.  They are now ignored, unless the \\?\ prefix disables the path
normalization.
3 files changed