Refactor unit tests to check on XDG / not XDG platform