Python: Generate NEWLINE token at end of file if none.