Consolidated the readCert and readKey functions into a single function called readPEM.

Signed-off-by: Joe Dallago <jd.dallago@gmail.com>