improve Windows detection

perldoc says, "In Windows platforms, $^O is not very helpful: since it
is always 'MSWin32'", which turns out to be useful for just detecting
whether we are running on Windows.  The previous check would incorrectly
trigger on Mac OS X because the $^O is 'darwin'.
import dir so source is explicit
Merge pull request #4 from nnutter/master

Tests Failed on Mac OS X