Test cert-corresponding key for existence rather than filehood

Fixes #6