fix 'make master' bug that showed up when the gem pattern changed.

- add test to make sure it don't get broke again
- make the 'make master' and 'delete' links look a little better.