Free screens in last-in-first-out order.

Fixes #144.
Merge pull request #147 from eaburns/dev/invcrash

Free screens in last-in-first-out order.