Fix possible resource leak in serialization.
Add integration tests/example app instructions to README.