A waveguide high-pass filter system for measuring the spectrum of pulsed terahertz sources