Rewrite Settings doctests as unittests

Prompted by test failures on Windows: it's easier to do

  self.assertEqual(get_some_dir(), os.path.normpath('/expected/dir'))

than achieve the same OS-independece in doctests.

(This is not done yet, I want to split the refactoring from the fix.)