Generation of episodic magnetically driven plasma jets in a radial foil Z-pinch