_get_xdg_config_dir(), _get_xdg_cache_dir() - Restored in a way that the functions fulfil the specification of the standard.

The previous change to avoid exceptions if no home directory exists broke the standard. Configuration and cache directories could be specified by environment variables independent from the existence of a home directory because they can be elsewhere.