Run SQL commands one at at time to properly trap errors.
Tidy SQL statements before running them & skip empty lines.
Reorder tables in JobDB so that they can be created from scratch.
Merge pull request #19 from ic-hep/dbfix

Fix database bugs