changing dir handling for windows

For issue #8.  Makes things work on Windows, haven't tested on other platforms.