Use stderr for output when the output file is "-" (fixes issue #216)