Stub execpipe using StringIO
The real execpipe yields an IO object so this is more realistic as a test.