Sort lists read from filesystem

Fixes unstable tests on some nodes, as the returned order depends on the
filesystem.