Added keyToPEM method