Patch from Scott McKellar implementing cleaner daemonization; moved daemonizing code...