Fixed layout bug in wordcount.py
Added error dialogs for table and image insert
Added prompt to save before closing a modified document