Fix foreign table name quotation in schema table and Sqlite platform

This fixes a bug introduced in PR #302 where the foreign table name did not get properly quoted in some circumstances.