Add 'path()' methods in TreeNode