handle /dev/null for windows by converting to > NUL instead