code: function(location, name) {
    this.location = location;
    this.name = name;
    if (typeof localStorage === 'undefined' || localStorage === null) {
      if (this.name) {
        this.name = require('sanitize-filename')(this.name, {replacement: '_'});
        require('mkdirp').sync(this.location);
      }
    }
    else {
      this.localStorage = localStorage;
    }
    this.path = this.location;
    if (this.name)
      this.path += '/' + this.name;
  }
docs: Abstracts storage to file system or html5 localStorage. name is optional