Adapts interface of Tree::getPath
Check if a directory is empty before deleting it

Check if a directory is empty before deleting it for all different
kinds of tree derivatives; this uses a method for determining the
number of children for a node in a tree.

Should help to keep trees consistent, especially in the database.