Fixes a fd leak
Transition to pycurl
Expands test to cover channel synchronization