title: Electron can't write files on windows 10
body: <p>Using fs-extra to write files is failing on windows 10. The <a href="https://github.com/jprichardson/node-fs-extra/blob/HEAD/docs/outputFile.md" rel="nofollow noreferrer">outputFile method</a> is supposed to create any missing directory before writing, but it's throwing an error. I know the Downloads directory already exists, though.</p>
  
  <blockquote>
    <p>Error: ENOENT: no such file or directory, open 'C:\Users\josh\Downloads\2018-01-13_15:14:11.png'</p>
  </blockquote>
  
  <pre><code>const fs = require('fs-extra')
  const app = require('electron').remote.app
  const moment = require('moment')
  
  let dataURL = this.$.canvas.toDataURL()
  let filename = moment().format('YYYY-MM-DD_HH:mm:ss') + '.png'
  let buffer = new Buffer(dataURL.replace('data:image/png;base64', ''), 'base64')
  let filepath = path.resolve(app.getPath('downloads'), filename)
  fs.outputFile(filepath, buffer, err =&gt; {
      if (err) {
          console.error(err)
      }
  })
  </code></pre>