fixed jinja2: allow offline context to override globals

- previously globals may override offline context
fixed import paths