fix: clear directory before generation of context

fixes #927