Improves SSL certificate generation

Export the certificate in the PEM format instead of the DER format so it does not need to be converted before merging in the pem file.
Merge pull request #229 from jeroenj/patch-1

Ok, worked fine for me. Merged.