I managed to get my script working by changing the comparison function from '==' to '=' as suggested by 'alister' in the unix and linux forums ( http://www.unix.com/shell-programming-and-scripting/141856-how-avoid-unexpected-operator-error-when-comparing-2-strings.html ) and so my script looked like this
# Else if the script is being run in the arrayscripts directory, add /output/ ...
elif [ "$basePath" = "arrayscripts" ];
then
echo "$dscr has started to run."
cpuPath="`pwd`/output/cpu.binary"
txtPath="`pwd`/output/cpu.txt"
csvPath="`pwd`/output/cpu.csv"
Hope that if anyone gets this same error as I did, that this answer will help them.
.