[WIP] SPARK-964 Fix for -java-home note.

I just did a manual testing of this.

with -java-home "jdk", setting just JAVA_HOME and both. Hope it covers all cases. 

It is work in progress since it is not ready to merge. Once #17 is merged this can be rebased.