gnupg test fix

The gnupg lib will stack trace if the gpg binary isn't present on the
system.
Fixed silly mistake
Fix gpg test
Merge pull request #14010 from cachedout/gpg_bin_check

gnupg test fix