Fix writing the PID file if there is no previous PID file.
Init script: Fix incorrect output redirection.
Add missing VS project files.