Fixing write specs

depends on https://github.com/jruby/jruby/pull/729