Fix occasional hangs in Snake app.

The timeout passed to waitForPress() could become negative in
the time elapsed between the time it is checked and used. This
would cause the app to stop responding to input. The badge would
return to the home screen after the app was killed.
Merge pull request #115 from jburgess777/snake-hangs

Fix occasional hangs in Snake app.