Depth support

supersedes #64 

note that I made #102 the target of this PR

@dbu: i guess we really should add a PathHelper::getDepth() method

/cc @petesiss