Cleans up bash script to me more readable + extras

- No longer depends on pcregrep
- Uses Ruby's YAML parser, which is in std lib since 1.9.3