Only use pumps for streams we are attached to.

I tried putting this into a separate make_pumps function but when I do
it complains with "IOError: [Errno 9] Bad file descriptor" when it tries
to set them as nonblocking...
If we aren't attached to stdin, we get KeyboardInterrupt on ctrl+c
When we only have stdout and stderr it becomes multiplexed

This means we have an 8 byte header that we have to care about.

I'm not sure if it's just when we don't have stdin, or if it's when we have
stdout and stderr. (i.e. I don't know the behaviour if only stdout or only
stderr is attached)