TreeModel improvements.
Sorting is ok now.
Refactor folders-first sort algorithm to TreeModel class.