async function ensureDir (fs, path) {
  try {
    let st = await fs.stat(path).catch(e => null)
    if (!st) {
      await fs.mkdir(path)
    } else if (!st.isDirectory()) {
      console.error('Warning! Filesystem expects a folder but an unexpected file exists at this location.', {path})
    }
  } catch (e) {
    console.error('Filesystem failed to make directory', {path, error: e})
  }
}
@param {Hyperdrive} fs
@param {string} path