Better messaging around PEM problems

Change-Id: Idd504c0ab91ec8abfba60139d0ec1cf5f7c42d5a