Use binary mode when opening unbuffered file.
Add tests for detaching pyzord.