code: function path2FolderName(filePath, keepTailSlash){
  		var pathSegs = filePath.split("/");
  		pathSegs.splice(pathSegs.length -1, 1);
  		return keepTailSlash ? pathSegs.join("/") + "/" : pathSegs.join("/");
  	}
docs: Returns the folder name from path.
  @param {String} filePath
  @param {Boolean} keepTailSlash
  @returns {String}