Redmine #6421: Fix incorrect newline mode when reading in execresult.

The output is expected to be text, so it should be read in text mode,
converting "\r\n" to "\n" in the resulting variable.

(cherry picked from commit 7f32ae03bf6d04199aae1ae94ed4ce671c76d520)