RemainingToText: Add sanity checks and some cosmetics

To try to prevent from te GSOD Loui (PD1LOI) is reporting here:
http://forums.openpli.org/topic/35639-ik-heb-zo-nu-en-dan-een-spontane-crash-op-mijn-dm8000/