Added a few more const where possible
runtests.pl: Improved the check for a crash during torture tests