THz On-Chip Waveguides for Ultrafast Magnetic Measurements