Update divideTextFrame.js

Adds better error checking, and ability to divide more than one text frame at a time.