roots and sort direction

add roots method (returns roots of tree)
add sort direction optional parameter to path and pathOf methods