Fix devnull and shell commands on Windows systems

Addresses #137 by OS checking before generating diff commands