Fixed bugs in codelist and organisation conversion scripts.