Consider empty /etc/resolv.conf as local dns + add unit test

Fixes #1373