Mock call to GnuPG in test_command to avoid network communication.

- fix for issue #570