Use getent instead of dig

Fixes the dependency on dig, closing issue #4

Also allows you to use an IP as the host address.
(dig returns empty if there is no DNS info available)