Add --detach and --pidfile options to daemons.