Move utility functions to utils

Moving these three utility functions to their own module makes it easier
to import them without creating a Jinja2 environment as triggered by
registering helpers
Merge pull request #54 from willkg/move-utils

Move utility functions to utils