Guarding against leaking GCHandles in read/write operations

See #19