Fix FilteringPathname comparisons and sorting