Fix test.py.

It may detect the need-screen-escape incorrectly or not invoke the vim
subprocess in the first test case.  These could be fixed by adding a
short sleep.