Support for other menus

Hi Graham,

I had the need to create a categories.txt (in the same style as menu.txt), so made a few minor changes to support this.

Hopefully it's a desirable change.

Ash.