Only open sprite image once for all queries, place images in subdirs.

Also added a script to search for any composite.json files below a given
directory and run the processComposites script on each.