Fixed bash-script to work on CentOS6 and OS X
Merge pull request #1 from aholen/master

Fixed bash-script to work on CentOS6 and OS X