Relative humidity sensor designed for tough processes