Escape newline characters when dispatching data

FIX for Issue #881 .

As this is my first commit to an open source project ever, please be understanding if I made some mistakes. I'll try and correct every problem that might arise.

As I am not really familiar with the structure of the mopidy or mpd in general, there might be a better way to fix this I don't know about. I am more than willing to adapt and change it if it is necessary!
I actually only changed it because the line would have been longer than 79 characters and flake8 complained. I actually liked the generator expression more.