Remove back references in freshness detection code

Commit eeff805e0bcdab5317ed1027bef2b625a8f7f94b (fix for issue #37) breaks detection of branch freshness. To avoid further confusion around this code, I have simplified it to not use regex back references.