Cookie fixes in libmal

Now cookies are automatically ‘fixed’ (newlines are
converted) after saving, as opposed to after a load
failure.
Also, fixed a bug where the last cookie would get
cut off.