Rewrite in Bash

Initially when I wrote this I was learning Python and this served as a
good little project to learn on. Now that I use this day and day out I
realize how painful it was to have written this in Python. It's much
more natural as a BASH script...so this changeset makes that happen.