code: async function ensurePath(path) {
      const dir = dirname(path)
      try {
          await make(dir)
          return path
      } catch (err) {
          if (/EEXIST/.test(err.message) && err.message.indexOf(dir) != -1) {
              return path
          }
          throw err
      }
  }
docs: Make sure that a file can be created by creating all directories to which it
  belongs, e.g., ensurePath('/usr/local/test/wrote.data') will attempt to
  create /usr/local/test/ directory recursivelly.
  @param {string} path Path to the file
  @returns {Promise.<string>} Same path as passed
  @throws {Error} When the first folder in the path is non-executable