Dynamics of sausage instabilities of a gas-puff Z-pinch