Small refactoring

pipeLoop now returns the final dflags, rather than having
runPipeline' extract it from the end state.
Inline get_output_fn

It's now only used once
Small refactoring: Don't pass a redundant output_spec around
Fix some m4/shell syntax in aclocal.m4, spotted by Jan Stolarek

[ ] is m4 syntax, so we need to use 'test foo' rather than '[ foo ]'.
Small refactoring: Don't pass redundant stop_phase to runPipeline
Small refactoring: Move the end-of-pipeline move into pipeLoop