Refactored so as to test dictionaries off samples.

To do this, we stripped the notion of source and target languages from
dictionaries, which can now load from a stream, and no longer need a filename.