Running `tools/run_tests.py --check-magic-strings` causes an IndexError,
but the script exits with 0, indicating error-less run.
Added error checking to the file, to indicate errors in the future.
Fixes#2522
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu