Sort file names before comparing them.