Extracted important bits from the keystore loader; improved speed by 2-3x.

Assumes keystores all have a 20 byte SHA hash at the end (which was the case for me, seemed probable, and looked likely to have been assumed, anyway.)