Set localhost properly

We need a proper resolution of localhost in order to be able to run
things like ntp offset checks.
Merge pull request #353 from craigtracey/localhost

Set localhost properly