Fixes for tests and updated dependency on python gnupg