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