removed deprecation warnings for StringIO methods

I was getting a lot of deprecation warnings because `.bytes` is deprecated in the `StringIO` class. This pull request changes `bytes` to `each_byte`.