Allowed JAVA_HOME to be set from the command line

Just as in the `play` script, allowed the JAVA_HOME to be set from the command line in the `build` script. This allows for testing and building Play and Play applications using different Java versions. It also makes sure that the `play` script behaves consistently regardless of which code path is taken in the script.