Added dir parsing to tree.