Purify gas produced after reactions with sulfuric acid
Pass the gas mixture through Anhydrous Calcium Chloride or Silica Gel. Calcium Chloride is quite hygroscopic and absorbs water vapors from the gas mixture. Alternatively you can use Silica gel, which adsorbs water due to its nature as a good adsorbent. 

Edit: To get rid of the acids present in the vapor, bubble the mixture through a concentrated base solution. Acids would react with the base, while $\ce{CO}$ being a neutral oxide, simply doesn't react and can be collected.