* --state, --path, and --run parameter can be passed a filename; standard is "-" (stdout)
* adjusted the test cases accordingly
* fixed a bug in the Output class: stdout must not be closed more than once