Sort files and folders correctly