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 only want the names.