Eliminating recursive directories