Fix #165 - make explicit which vars are available to templates

As with python modules, if section 2 has an __all__ variable,
only the variables whose names are in that list are 'exported' to
the template.
test type returned not the returned value
Merge pull request #214 from gittip/issue165

Fix #165 - make explicit which vars are available to templates