Fix an issue with path construction

The individual table dumps were all written into the ./tables directory instead of to ./$DB/tables, even when the DB could be inferred from the dump file or was explicitly provided with the -u option. This was especially problematic for dump files containing multiple tables with the same name from different DBs, as the table dumps would overwrite the previous one.