Xdg Basedir for configuration file

Some improvements related to #112.
I just looked at the code for pyxdg and it is literally just this line, untouched since 2012: https://github.com/takluyver/pyxdg/blob/master/xdg/BaseDirectory.py#L37

I think we can vendor this in then.