Some fixups to how "expanded paths" are saved.

- When the number of expanded paths exceeded what could be saved in prefs
  it would just randomly (due to Set iteration order) remove paths
  until it would fit. That's crazy. Remove the deepest paths first.
- It happily saved paths that don't even exist anymore. Prune those out
  on read.