Added some error checking around the getPGP functions. 

Most users don't have a PGP key defined, and this errors out if it there is no PGP key.