oops - already there's a bug!  An index value should be a list of rows, not
a row, as index[file] or index[variable] is far from unique!
still not tested, but this is a nearly-complete simple first cut at
the file table building code