Be cleverer about fetching category info. Fixes #73

This addresses the fact that the list categorisation system was being
pretty dumb about figuring out catagories, in a kind of hope and pray
kind of way. This causes ugly errors in web-applications that display
failed http requests to end users.