Sort tree entries as if they have a trailing slash before appending them to TreeFormatter