Add tests for stdout/stderr (ref gh-1).