Fix tests in S4 deploy scripts. Test for S4_HOME.

Various fixes for the deploy script for S4.
Use quotes with string literals. Saner s4-properties defaults