Fix devnull and shell commands on Windows systems