Update BatchPlotting.sh

Fixed a few bugs