Improve example daemon.py.

Closes #77