Clean up files and streams for timing output.

Total time will be written to walltime.txt, and single step times to
step_timing.txt (changed suffix from param to txt). This did not work
properly before this fix (step_timing file was overwritten each step).