Cleanup directory node; add unit test for directory node; cleanup ProjectTree.