Mark interned iomodule as GC root earlier

Patch from Charlie Paucard. Previously, the iomodule object was marked
as a root after the allocation of file streams it held, but those
allocations could trigger garbage collection. This commit moves the
rooting earlier.