Fix folders sorting procedure.
Fixes the issue where after creating a folder with name 'Abc abc'
it were added before existing subfolders of folder 'Abc' and after 'Abc'.