Refuse to execute with bash major version smaller than 4
Fix a bug if SBT_OPTS or JVM_OPTS is not defined
Get rid of sed dependency