Fix daemonizing order. Ruby 1.8 compatible for now.