Change deserialise to properly handle when there is a '\r' in the key.
It turns out that bytes.splitlines() can split on a plain '\r', which breaks things.
So instead, we use bytes.split('\n') which work correctly, though we have to remove
the extra '' at the end.