Fixed some problems with converting to Python 3, added prosl_utils
(just split out some other functionality), added line numbers to the
_split_text function.

Many things in this commit remain untested.