bugfix #40: don't try to color non-matching groups

This commit fixes the bug mentioned in issue #40.

The start and end of match return nonsense for groups that didn't match anything, so I added a check to ensure that there is actually text there to color. This prevents the match from being printed twice.