Relative imports and exec(global_vars)

Fixed two minor issues:
* Changed to relative imports. Easier to use as a sub package of other packages.
* Template function was not available fully available in the function scope. Needed to add them to globals_vars. See globalvars test case.