gpg: Fix testing for secret key availability.