Use Socket to get the hostname, don't shell out

/cc @skalnik @kdaigle