Merge runShell and runProcess via a template

See the comments in processutils.d for the details.