Measuring moisture in building materials