Added check for CommonJS Package directory structure in moduleToFileName method