Added flexibility on adding/omitting ".js" at the end of a package name.