improved tempfile handling for machine output
Merge remote-tracking branch 'xithan/develop' into develop