Fixing fs.existsSync issues in older versions of node