Use cursor.executemany() for performance; add table of filenames