S4-66 Check that appClass extends App

Patch by Aimee Cheng
S4-66 Check for indirect extension of s4.App

In case of failure throw exception instead of stopping the process