Added some error checks for sanity.
* Check whether database is valid or not. If not valid, then
simply reset current database to None so that no other dialog
can be invoked.
* Check for articles existing before exporting. Makes no sense
to create a website without any articles.
* Other checks to avoid exceptions when invalid database is
loaded.