fixes #7611

cc @njx @redmunds 

the reason is - path gets modified for OS in `getModuleUrl` method, so check here shouldn't be OS specific, because this one is before that method

tested on win + linux, not mac