Rewrite gpg-agent-startup script to handle errors better