[#1839] Update bash styleguide.

Problem description
===================

This updates the bash script styleguide.


Changes description
===================

Update script for better error handling.

This also contains a drive-by fix for the new squash merge.


How to try and test the changes
===============================

reviewers @dumol 

Changes are already published here http://styleguide.chevah.com/bash.html

Please check that everything is OK.

Feel free to add things that are not specified. @dumol this is a good time to discuss bash styleguide.

Thanks!