I have already fixed this bug in the next version of the PIDoc compiler; thanks for detecting it.
However, note that this error happens because the output directory where you are trying to generate documentation is not a valid PixInsight documentation system (see the referred source code). You should generate a new PIDoc system first by selecting the corresponding option in the target system section of the compiler's dialog.
Yes, I have to rewrite the whole documentation for the PIDoc system, the compiler and the PIDoc language...