Fix JAVA_HOME SCRIPT to support more linux distros

Add if else clause.

If the bin/java directory exists in a specific location, we know that
it is debian/ubuntu. Otherwise, it is rehl/centos
Clean up bash script

Check for JAVA_HOME in 2 places, if it’s not found then exit with an
error. This supports Debian/Ubuntu and RHEL/Centos
Added error log if JAVA_HOME not found
Merge pull request #28 from mesosphere/refactor-classes

Fix JAVA_HOME SCRIPT to support more linux distros