Add needed headers

Also remove group/other write access to PID file