Install pdnsd as a last service and use better workaround for incorrect or missing /etc/resolv.conf