Build on Windows

Swap stat()/S_ISREG with GetFileAttributes() via a preprocessor conditional.
Tested with Visual Studio 2012 Express and Visual C++ 2008 Express on
Windows 7.
Merge pull request #3 from orbisvicis/master

Build on Windows