Fix cleanup in daemonize script