o use the value of environment $XSB_USER_AUXDIR if defined and not ""
o use $HOME/.xsb, if HOME is defined
o use $USERHOME/.xsb, if USERHOME ...
o use XSBinstalldir/.xsb
This generalization is needed when XSB is used by a servlet. Eg, tomcat runs as a nologin user and its $HOME is owned by root. So, no way to run XSB this way. With $XSB_USER_AUXDIR, one can point to a dir owned by user 'tomcat'.
Dunno how this kind of services are done on windoze, but probably useful there as well.