check input TBX dialect

The user might accidentally input the wrong TBX dialect, so check for
the correct "dialect" attribute and croak if it is missing or
incorrect. Solves #3.