In these cases, use a different command for Ghostscript. In such cases, I usually just use stdout for output.