Pipetastic `PIPE` avoidance and closure

This commit removes the use of `PIPE` where it is not required (replacing
it with `STDOUT` and/or `STDERR` redirection to `/dev/null`).  It also
performs various `Popen.wait()` return code checks using a combination of
`Popen.communicate()` and the `Popen.returncode` property.