TRQ-2890, TRQ-2909 - refactor pbsdsh to better handle tasks' stdout (and add
    stderr) capturing when -o used.