The fixes the reverted set of pexpect changes

- The test I added would not terminate because
expect() was never returning a trueish value