build: Updated DIR_ROOT detection.