Add support for port forwarding take two

This is #133 plus a fix for the pipe issue discussed there.