TST/BUG: use BytesIO for Python 3.4 TestEncoding