Added information about how the script sets up the environment
moved setwd() and baseDirectory assignment to top of file (since they may need to be modified if the script is downloaded)