Refactor: for generality, support both shell commands and raw executables, like System.Process does.