[TWEAK] Use return/exit instead of function to make

the spark-env.sh idempotence gate a bit easier to use (more decoupled from the settings).