added support for http/https proxies
using tempfile.NamedTemporaryFile() as suggested. removed uneccessary import.
Merge @captnswing proxy support changes.
simplify the proxy code (urllib2 does the right thing by default) and don't use the with statement (for now)