Still more fixes for the $BUILD_DIR problem.