Tests for import & export creeds

and a few test fixes