[TIDOC-1974] Fix warnings reported by JSDuck
[TIDOC-1974] Create output path if it does not exist
Missing semicolon
Merge pull request #6322 from bhatfield/tidoc-1974

[TIDOC-1974] Fix warnings reported by JSDuck