Correct line number reporting when parsing

- Change 'line_no' to 'index' to show its real meaning and then derive
  actual line numbers from it by adding 1. This means that error messages
  and the StopLine column in ProcessedFiles will be more accurate and
  useful.
- Replace deprecated .has_key() with 'in'.