improved detection of errors when checking openssl certificate file path, closes #2564