replacing old code for defining scriptBasePath with one for new system.