Check tables exist before creating

Props @ericjuden
Merge pull request #8 from johngodley/fix/tablecreation

Check tables exist before creating