Use HTTPS and validate cert if RootCA directory exists

This would fix issue #5