Use pycurl instead of urllib2, added timeout functionality