Fix #12: JSON serialization-error in "Save ferm local facts".

Make unique first, then sort. (And this is quicker, too).
Merge pull request #14 from htgoebel/master

Fix #12: JSON serialization-error in "Save ferm local facts".