title: ENOENT, no such file or directory on fs.mkdirSync
body: <p>I'm currently starting up my NodeJS application and I have the following if-statement:</p>
  
  <pre><code>Error: ENOENT, no such file or directory './realworks/objects/'
      at Object.fs.mkdirSync (fs.js:654:18)
      at Object.module.exports.StartScript (/home/nodeusr/huizenier.nl/realworks.js:294:7)
  </code></pre>
  
  <p>The weird thing, however, is that the folder exists already, but the check fails on the following snippet:</p>
  
  <pre><code>if(fs.existsSync(objectPath)) {
      var existingObjects = fs.readdirSync(objectPath);
      existingObjects.forEach(function (objectFile) {
          var object = JSON.parse(fs.readFileSync(objectPath+objectFile));
          actualObjects[object.ObjectCode] = object;
      });
  }else{
      fs.mkdirSync(objectPath); // &lt;&lt; this is line 294
  }
  </code></pre>
  
  <p>I fail to understand how a <code>no such file or directory</code> can occur on CREATING a directory.</p>