Cleaning the tree of directories