added a couple more fixes for download tree
fix problem with reading directories