i don't know sqlite. never really used it so i can't say much about that.
can you take your file paths and use that to prefix the table names? there is nothing stopping you from creating the table name dynamically and accessing using db['table name string'].

