Fix for older versions of SQLite

Use the shim method call to get table information instead of the direct DBI
call.  Older versions if SQLite return NULL for schema.  Newer versions can
return 'main'.