Tests simplify and fix for 5.8.x capture_stdout/stderr

there wa incompatibility with perl 5.8.x in implementeation of capture_stderr/stdout,
workaround this, thus simplify interface.