Stability analysis for the Big Dee upgrade of the Doublet III tokamak