added checks for phantomjs and curl to be on the shell path at the beginning of the script. It will exit if they cannot be found.