fix pexec(): needs to use pipes for stdin/out/err
Fix local and remote interrupts and pexec()

This is a bit complicated, and the current solution may not be
ideal! To coax ssh and bash to do what we want isn't easy - they
both want a tty, and we also don't want to interrupt background
processes such as our ssh sessions! For now we allocate a pty and
use -tt (even though that should be redundant!) except for
pexec, which attaches to a pipe (and whose ssh session is probably
killable.)