Miscellaneous Bug fixes and enhancements

* Fix a bug which prevented CA certificate files
   from ever being saved

 * Add a --text parameter which prints each request,
   certificate, and key to standard output.

 * Fix up exception handling

 * Improve logging

Change-Id: Ic40b9d33ec34e509c925fd8a0ff7e66a58bd9b60