This incorporates a fix for #55

But I still haven't tested it on Windows.