Fixed a couple of bugs introduced during the switch to pycurl

Signed-off-by: Lars Kiesow <lkiesow@uos.de>