Fix Windows build.

Windows will see that `S_IREAD` & `S_IWRITE` aren't defined and try to
access `S_IRUSR` & `S_IWUSR` which don't exist on Windows.

Signed-off-by: Shannen Saez <shannenlaptop@gmail.com>
Merge pull request #329 from shancat/master

Fix Windows build.