Encapsulate more code into check_all_files().

Substitute hashrefs for hashes for storing state:  a step on the road to an
object.