pkg/fileutil: sort files in tests

Readdirnames makes no guarantees about ordering, so sort before testing the
listing. This test was failing consistently on Linux for me.

Also, simplify sort.Strings invocation in wal.


/cc @barakmich @xiang90
I am happy with that, I figured you might have some reason why you implemented this rather than just using ioutil.ReadDir ?