This should work correctly now. It uses the ``encodings/pem`` to parse the PEM blocks from stdin, but send the encoded blocks to the API.

I think to merge the two functions they would need to have a signature along these lines:

      readPem(path, stdin, header, max_blocks)
      readPem(*certPath, stdin, "PRIVATE KEY", 1)
      readPem(*certPath, stdin, "CERTIFICATE", 0)