Output TOC and tree in sorted order to make output stable between invocations. Addresses issue #49
Merge pull request #50 from liggitt/sorted_order

Output TOC and tree in sorted order