code: function(contents, fullPath, defaultFileName, force) {
  	var fullPathResolved = path.resolve(path.normalize(fullPath)),
  		dir;
  
  	if (path.extname(fullPathResolved) !== ".json") {
  		dir = fullPathResolved;
  		fullPathResolved= path.resolve(fullPathResolved, defaultFileName);
  	} else {
  		// assume intent is path/fileName.json
  		dir = path.dirname(fullPathResolved);
  	}
  	// If dir does not exist yet, create
  	if (!fs.existsSync(dir)) {
  		mkdirp.sync(dir);
  	}
  	// if file already exists...
  	if (fs.existsSync(fullPathResolved) && !force) {
  		errorHandler("Destination file " + fullPathResolved + " already exists");
  	}
  	var writer = fs.createWriteStream(fullPathResolved);
  	var buff = new Buffer(Buffer.byteLength(contents));
  	buff.write(contents);
  	writer.write(buff);
  	writer.close();
  	logger('Created file: ' + fullPathResolved);
  }
docs: Writes the given data to the specified
  file location. If the location (directory) does not exist yet, it is created.
  
  @param {String} contents The data to write to the FS
  @param {String} fullPath - create directories if necessary
  @param {String} defaultFileName - if fullPath does not end with a filename.json, use this as filename.json
  @param {Boolean} [force]