Check for cert bundle existence before using it

Please review @icewind1991 @LukasReschke 

Fixes https://github.com/owncloud/core/issues/11942

@karlitschek backport ?