Added a few comments and minor checking in glassfish.sh