Improve/Fix seed script

Seed script fails partway through (this was brought up in #419).

Also, it would be nice if we could add another script or a flag option or what have you for 'quick mode', which woudl auto generate app configs and other metadata and generate some fixed number of database items
move this block above categories so that it'll still be generated if zero categories are created.