gpg: Fix TOCTTOU when updating keyblocks.