fixed bug in objectediting (unclosed stream)

This bug made the generated w3o files corrupt, because of missing bytes at
the end of the file.