Fix httpretrieve

This PR fixes a couple of issues with `httpretrieve.r2py`. Thanks go to @smmiller, @DennisMirante, and @yyzhuang for reporting / fixing / feedback.