Get bin tests working on Windows (Fixes ##228)

On Windows the tests in tests.test_bin were failing for reasons listed in
and tweaking the commands being tested where necessary. I also introduced
a wrapper for tests.test_bin.run_cmd to make running OS dependent commands less
cumbersome.