Don't use BSD style mode flags.
Define mode flags for Windows.
Define `S_IEXEC`.
Merge pull request #42 from take-cheeze/mode_flag

Fix and improve mode flag.