Various improvements to get testing to work on win32/cygwin

As discussed in #69