python-helper: Flush output after each write
python-engine: Restructure readCoverageDatum and correct validity check

The validity check was off by one coverage_datum.