Add support for XDG basedir spec and move default cache dir to Library

Closes #10.