Use getent instead of dig so that /etc/hosts is respected.
Exclude 127.* from IP lookup.
Merge pull request #4 from bretthoerner/hostsfile-fix

Use getent instead of dig so that /etc/hosts is respected.