Adding global var for getting a script's name

Adding a global variable for getting a script's name. This is the
scriptName variable. The function that used to do this job has been
deprecated and will be removed in future versions.