Open output earlier

This makes the solver open the output file just a little bit earlier, so that the `output_solver.txt` catches any output from the parameter initialization code. (Note, there is no printing there currently, but I sometimes add it there for testing.)

Also changed the mesher so that it does things in a similar manner (though it already opened the output at the earliest point it could).