Fix infinite loop from deprecated `read->read!` function

On current master of Julia, this fixes a deprecation of `read`, which appears to cause an infinite loop (or brewing stack overflow).

I attempted to make this work also on older versions of Julia, but I realized that testing this has gotten harder due to the versioning of package directories. So I can't be certain this works.