Implemented flawed getDirTree.