Daemonize and use syslog instead of stdout

Also provides -d option to run in foreground.