Add missing functions, error check to getpot

Now when we evaluate ${= exp ${foo}} or ${= typo ${foo}}, it should
return exp(foo) or throw an error rather than just returning 0.