Use 'with open()' instead of open()
Use 'with open()' instead of open()

This ensures that the files are closed, even if an unexpected exception
happens.

Signed-off-by: Frida Flodin <ff857b0d3de7ab66a379b61924cd8bf58e81be7b@cendio.se>

astrand/hiveconf,astrand/hiveconf