Make sure we have a working PDO instance before clearing temp tables in the tearDown. Fixes #302.