Fix several issues in the gestures libraries.

This mostly fixes how gestures libraries are saved and loaded.
Saving a library twice in a row was erasing the entire library,
which was preventing the sketch test app from working propertly.
4 files changed