Properly deal with models that cannot be exported.

This fixes #41, because saving models is now implemented for most
models and fails gracefully in the rest of the cases.