Handle local download

Integrated the PR from studiomelipone that purported to solve local download.  Fixed that fix to actually work. Tested in tests (report_input_spec.rb in jarvis) and by using upload & download in development ; *NOT* tested yet in conjunction with real S3 backend.