[#72] Use env variables

* Check for the env variables the script needs
* Use FLOW_ prefix
* Use bash scripting style guidelines from Google: http://google-styleguide.googlecode.com/svn/trunk/shell.xml