On python3, sys.stdin/stdout are Text-mode streams, which can be
approximated with io.StringIO. On python2, there's no real
distinction between Text-mode and Binary-mode (except for line
endings, which sys.stdin/stdout also treat as Text-mode). Hence,
there's no need to explicitly use io.BytesIO on python2.
StringIO.StringIO is equally or more representative of how the
mocked streams behave.
Therefore, just use six.StringIO instead of different types for
python2 vs. python3.
Change-Id: Ib80e10a40e68ece946b344ce7bcfba5e182ce848