Added the ability to determine hive type from the binary file. Copied from
old registry parser