Added support for running as a daemon with twistd