Monkeypatch RestClient to keep it from closing IO objects after upload