BUG: Fix compressed files in Py3 to return str

Fixes #3963

Fixed bug with reading compressed files in as `bytes` rather than
`str` in Python 3. `gzip` and `bz2` both now return `bytes` rather
than `str` in Python 3, so just needed to wrap them in an
`io.TextIOWrapper` to make everything work.