Change XDG_CONFIG_HOME to XDG_DATA_HOME and check to make sure it exists

This commit fixes a bug that occurs if $XDG_CONFIG_HOME is unset and moves things to $XDG_DATA_HOME(or $HOME/.local/share if that's unset.)