[#20] Sort the file list using a comparator function

* Sorting the file just based on filename returns a wrong list of
  elements