Strip CR/LF from end of received data

Rather than selectively stripping it later.

This stops stray CR characters appearing on the end of returned
profile names for example.