Use native os.hostname rather than exec

If getHostName is called repeatedly it will throw an EMFILE error, plus it takes on average 4ms per call. The native call takes on average .001ms per call.