Factor out `get_rule`
Factor out `get_rule`

This just make it slightly more obvious how `render_template` works, and
adds another seam for testing.

jerivas/staticjinja,Ceasar/staticjinja,Ceasar/staticjinja,jerivas/staticjinja