Check /etc/resolv.conf every time for 127.* content

A continuation of @rhatdan's PR #8455, closes #8425.
while I was in here I changed a bunch of `'%s'` to `%q` because they were driving me nuts.