Move public key deserialization code to keychain.rb, fix syntax errors