inveniocfg: tests runner file closure fix

* Fixes "I/O operation on closed file" when running
  inveniocfg_unit_tests.py due to logging trying to cleanup
  a closed StringIO.  (closes #1327)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>