Make readdir ordering deterministic

The .sort is extremely fast, and it cannot hurt to make things
deterministic, to avoid flickering tests for instance.

----------

This is borderline bikesheddy, but I noticed the `readdir` call without `sort` when I read the source. Please merge if you like, or close otherwise. :)