Try to fix test-spec failure on macOS
Try to fix test-spec failure on macOS

Not sure what is happening, but spec/ruby/security/cve_2018_6914_spec.rb
fails on macOS.
https://github.com/ruby/ruby/runs/294462511#step:10:134

I suspect that the state of a directory is weird immediately after it is
created (not writable or even world writable?).  This change tries to
make sure that ENV["TMPDIR"] is actually used by Dir.tmpdir.

eregon/rubyspec,eregon/rubyspec,ruby/spec,nobu/rubyspec,eregon/rubyspec,nobu/rubyspec,ruby/spec,nobu/rubyspec,ruby/spec