code: function getDirectory (baseDir, collection) {
    let dir = collection.substring(0, collection.lastIndexOf("/"));
    dir = dir.toLowerCase();
    return path.normalize(path.join(baseDir, dir));
  }
docs: Returns the directory where the given collection's JSON file is stored.
  
  @param   {string}    baseDir    - (e.g. "/some/base/path")
  @param   {string}    collection - (e.g. "/users/jdoe/orders")
  @returns {string}               - (e.g. "/some/base/path/users/jdoe")