Fix StringIO problems in Python 3 in remote webelement