(Untested code) for daemon() and chdir() in dmxdog