[#13] workaround for select.select not working on Windows
[#17] slightly different heuristic for working directory