Added a helpful error for users with single-document corpuses
This adds the helpful error message suggested in #452 for users trying to do language model fine-tuning  with one long document as a corpus, and replaces some of the `randint()` calls with equivalent cleaner `randrange()` ones.
Looks good to me, thanks @Rocketknight1 