--- a/rbldnsd.py
+++ b/rbldnsd.py
@@ -3,6 +3,7 @@
 
 """
 import errno
+import os
 from itertools import count
 import subprocess
 from tempfile import NamedTemporaryFile, TemporaryFile
@@ -67,8 +68,12 @@ class Rbldnsd(object):
         self.datasets = []
         self.daemon_addr = daemon_addr
         self.daemon_port = daemon_port
+        if os.environ.get('RBLDNSD_PATH'):
+            daemon_bin = os.environ.get('RBLDNSD_PATH')
         self.daemon_bin = daemon_bin
         self.stderr = stderr
+        # DnsRequest.__init__ fails if /etc/resolv.conf is empty
+        DNS.defaults['server'].append('127.0.0.1')
 
     def add_dataset(self, ds_type, file, soa='example.com'):
         self.datasets.append((soa, ds_type, file))
--- a/Makefile.in
+++ b/Makefile.in
@@ -123,6 +123,7 @@ clean:
 	-rm -f $(SELF_TESTS)
 
 distclean: clean
+	-rm -rf __pycache__
 	-rm -f $(NAME) config.h Makefile config.status *.py[co]
 
 spec:
