Manage a pid file in Node.js