lib/fsExt.js
function getPathAncestors(filename){
    var tree = filename.split('/');
    tree.pop(); // remove last
    
    var treePath = [];
    for(var i=0;i<tree.length;i++){
        treePath.push(createId(tree, i));
    }
    
    function createId(tree, count){
        var id = '';
        for(var i=0;i<=count;i++){
            id += (i>0 ? '/' : '') + tree[i];
        }
        return id;
    }
    
    return treePath;
}
function getPathAncestors(filename){
    var tree = filename.split('/');
    tree.pop(); // remove last
    
    var treePath = [];
    for(var i=0;i<tree.length;i++){
        treePath.push(createId(tree, i));
    }
    
    function createId(tree, count){
        var id = '';
        for(var i=0;i<=count;i++){
            id += (i>0 ? '/' : '') + tree[i];
        }
        return id;
    }
    
    return treePath;
}
helper - create ancestors list from path
@param {String} filename
@returns {Array}  ancestors list