allow re-importing a certificate
corrections in certificate saving

That change ensures that a CA certificate will not be
stored as server certificate.

Resolves #14
utilize the CA file if provided