Enable model auto-saving during training.

Fixes issue #44.