templateData issue

Hi,

I had problems running topdoc. A variable is not defined and throws an error when running. I made a small test case where I isolated the problem https://gist.github.com/piatra/5899487 

$ node -v 
v0.8.22

![screen shot 2013-07-01 at 11 47 32 am](https://f.cloud.github.com/assets/810040/729284/dafa1060-e22f-11e2-8c1b-ec27873073b2.png)

The pull request fixes it.