Be compliant with XDG specifications

Fix #730994 reported by Mauricio C Antunes, and with his advices