directory-first tree sorting