Updates
I haven't seen any improvements on this since the last post so I corrected it to work for all 20 levels and For the Barbarian, Bard, and Cleric fixed so it will choose a random Path also. On top of that fixed it choosing wrong casting modifier and even selecting the right casting modifier if a fighter went eldritch knight.