Added two new methods: getTextAfter, getTextBefore.
The method getText was a bit unintuitive when it came to cursors which
are selections rather than a caret. These two are more intuitive and
easier to use.