Robust temporary files for stdout/stderr