Python: urllib2 custom protocol handler