Update twister.cpp

More checks to be sure DM is in new format
Merge pull request #290 from dryabov/patch-2

More checks to be sure DM is in new format