Add -V, --version
Record the proper @master_pid
Write out the state post-daemonize. Fixes #189