fix syntax error in preflight

some additions to the lulu.py file as well.
syntax error found in preflight about q/Q was fixed by adding a
restoreState() function to content byte in PageHeaderEvent.java