[Daemon] Make the main executable
[Daemon] Fix daemon startup.

Daemons changes the working dir when starting, so we can't find
our files anymore when running as a daemon. Do a chdir first to fix
that.