Store chunk heights on exit

Fixes #34