I mentioned this somewhere a while ago. It is enough of a sysadmin problem to warrant a feature ticket. Open one on github for it. XDGBDS is not canon. So don't hardcode said paths. All paths should be specifiable in bitcoin the config file, whose location should itself be specifiable on the command line.