Fix tests to not launch gpg-agent when not needed.