make getAppMainScript() a bit more compliant with package.main