Perhaps you should access value of wgArticlePath via mw.config.get in order to reduce number of global dependencies.