Controlling the Phase Transition in CsPbI<sub>3</sub> Nanowires