Fix binary file check in FakeKeyStore