Don't assume IP-style socket addresses in error messages.

Closes #900.
Fix unix socket error test on python 3 on linux.

The remote address of a unix socket is apparently an empty character
string on mac but an empty byte string on linux.