correct .tx flag handling and while(room) conditional in emit vector functions

This commit fixes issue #99 and issue #100. It also adds more cpputest modules.