Updated to newer version of jsbn.js
Simplified logic for extracting the Pem