StoreDirect: add checksum which checks if store was closed correctly. If not it throws an exception and prevents (possibly corrupted) store to be opened.

This is related to bug report #186. This assertion should decrease reported number of data-corruption errors caused by direct mode.