Convert opening filehandles to use `with`.