added daemonize featuere.
fixed logic for emulate exit code of die. (see also perldoc -f die)