only display sections in TOC if they contain pages

Notice how "getting started" shows up here but doesn't have any pages:

![screen shot 2014-11-19 at 12 50 37 pm](https://cloud.githubusercontent.com/assets/2289/5114116/b67f4bfc-6fea-11e4-8b5f-2356f5b8f142.png)

This PR fixes that by ignoring sections without pages.