Get it working on Windows

* There is no signal.SIGPIPE on Windows.
* Clean up tests/test_cdiff.py to work on Windows.