Use dirspec instead of plain xdg. Closes #3574.