Modified GPG tests
Correctly skip unit tests if gnupg is not installed
Remove unused imports
Merge pull request #12644 from rallytime/gpg_test

Modified GPG Unit Tests