Local patch: Add "name" and "dir" to page data for template access

Annoyingly, each page object ALREADY HAS this data, but throws it away
before passing control to the template. This commit makes it hold on to
it, so pages can know more about themselves.