A test fixture to intercept writes to stdout.