Fixed crash due to corrupt plugins.

However, the messages in the catch block never get displayed, and I
can't figure out why. Without the block, LOOT will crash, so it's
definitely catching there...

Also tweaked how validity check messages are attached.
Fixed undefined var.