Handle case where SPARK_HOME is not set
Changes to allow re-use of test applications
Properly escape quotes and other clean-up for YARN
Note