Okay I took a look at a gear using this code and it's at least making sense now what you have done.  I think my only remaining concern is using _ to differentiate the files.  The regex seems a little flawed in that it would pick up anything with an _ in it.  Not just beginning with an _.  I really don't like _ as the separation in general but I can probably get over that.