Be more forgiving if PREF_MY_KEY is missing.

This also fixes the memory leak and context overwrite with gpgme_new(&ctx). You are doing this twice.