Invoke keep() on the output file of mlir-opt in case the invocation of MlirOptMain was successful, to make sure the output file is not deleted on exit from mlir-opt.
Fixes a similar problem in standalone-opt from the example for an out-of-tree, standalone MLIR dialect.
This revision also adds a missing parameter to the invocation of MlirOptMain in standalone-opt.
Should this be part of a separate patch? It is not really related to your proposed change.