improve error handling around documents

when loading a new document fails, one is not created
the operating system error message and errno is propagated to the dialogs
naming unexistent files on the commandline still is allowed, because one
often starts editing a new document that way. (currently, the default
template handling is not yet used when a non-existent document is specified
on the commandline.)