template: add exists function
Merge pull request #160 from kelseyhightower/add-exist-function

template: add exists function