Add unit tests and function doc strings to gpg renderer

Also some general cleanup.

One thing I wasn't sure of: will putting ``python-gnupg`` into ``opt_requirements.txt`` pull it in during automated test runs? Do I need to add it someplace else?