Patch from ovyalov@google.com:

Handle pexpect exceptions correctly so that processes spawned with
pexpect are always reaped.