lib: intro xdg_basedir

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: add test for xdg_basedir

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>