Safer opperations in c2ctool

Ditto than above.