https segfault fix

Fix for https segfault described in #22 
 - Fixed premature error cleanup
 - changed https_fetcher if condition to support https scheme