TESTS: Don't use exec for testing stdin. Modify process.stdin directly. Fixes #547

Avoids using `exec` for `stdin` tests by manipulating `process.stdin` in the tests and emitting events on `process.stdin` to trigger stdin parsing in the cli. This speeds up the test suite considerably.