ctrtool: updated exheader code

improved exheader validity checks