Merge pull request #1331 from michael-hart/public_key_pem

Add support for .PEM public keys, with tests and docs