Replaced all occurrences of $tooldir/scripts with $scriptdir.