Judge allows Oscar Pistorius to leave South Africa