Sort files to be hashed.