Here are different ways to obtain the realpath of the script. Each have their cons and pros and might have slight differences.
I am listing them here so overtime I can complete the list of cons and pros and what they actually do.
script_root=$(dirname $(readlink -f $0))