Add a daemonize() function

Create a simple function to daemonize a command.