An electrostatic probe with end plugs for measurements in a magnetized plasma