pkg/fileutil: sort filenames during ReadDir

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