Mock call to GnuPG in test_command to avoid network communication.

- fix for issue #570
- added mock as dependency