Extra input sanitisation in thesaurus_loader + unit tests