Made save more portable.

This should fix the issue of the friends list getting cleared when
something in it changes.