Issue #352: additional installation checks
* Check that PHP is installed
* Use curl to download data snapshot if wget is not installed
* minor style cleanups
* exit 1 codes + use echored if errors