Remove dependency on dnsutils

`getent hosts` will do what we need and it's part of glibc. Also means we can use `cut` instead of `sed` to parse the output, which is much simpler.