re-designed httpdownload.py and test/test_httpdownload.py