Apply a shell style guide to our shell scripting

See #195 

Attempts to follow guidelines here: http://google-styleguide.googlecode.com/svn/trunk/shell.xml