title: node.js recursive write file directory
body: <p>How do I use nodejs to write a file, if the file is in a directory that may or may not exist?</p>
  
  <p>It's kind of similar to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/5874142/node-js-write-file-with-directories">node.js Write file with directories?</a></p>
  
  <p>Only I need a solution that creates the file while node-fs only makes directories.</p>