Implement openpipe

Some other commands (such as readallfh) need to be tweaked to
work properly with pipes.  I'm also not sure if I should be
caring if closing a pipe fails or not (the JVM tests seems to
indicate that I shouldn't).  Providing a custom environment doesn't
work yet, and I'm not sure if I'm cleaning up after the child process
correctly.  It's a start, at least.