Implemented Tree.read and fixed Tree.build_from_dir