Python 3 byte string output: use errors="surrogateescape"

... if available on the version of Python that's in use. This allows
obtaining the original byte string (and potentially trying a fallback
encoding) if the bytes can't be decoded as UTF-8.

Previously, a UnicodeDecodeError would be raised with no way to treat
the data as bytes or try another codec.