Change from path.exists to fs.exists because it's deprecated in Node >= 0.8