Improved file handling
Improved file handling


Former-commit-id: 3ae39cf924ed0ec010a4db242ac9af5211a34434 [formerly ddc4694412a3a53941f83c6a4135a7376ff6d001]
Former-commit-id: 69e15396f9068eea77de7639aa21cdb28960c83d
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine