We use HelpStudio 2 to run the nightly doc build, and we haven't had any problems with relative paths since DocX 5 came out.
We use a simple batch file and Cruise Control to run the build, but that's about it.
The nightly build script we run looks like this:
%HELPSTUDIO% = path-to-hs2.exe
del /Q /S out-helpstudio
%HELPSTUDIO% SO.Database.hsp /b /s /bp=Default
echo CHM file complete