Better stdio mocking