Minor fixes for pgp pinentry handling