xdg_config_dir(): fix os.path.expand [sic] typo, and refactor