Don't use socket.gethostname() as it's prone to aliasing issues.

Candidate for 1.0.12