since my XQuery's share some common utility functions, I created a "global.xq" file to contain those functions, and the actual scripts import that file using
import module namespace red-db="red-db" at "global.xq";
However, BaseX then looks for that file in the working directory where it was started.
..should be fixed; please check out the latest sources.