Respect '\r' characters in nbconvert.
Added test
Use regex instead
Added one more test, multiple \r on one line
Merge pull request #5387 from jdfreder/nbcoutputstream

Respect '\r' characters in nbconvert.