Fix tests.
Implement exit code matcher for testing.