use less ruby in tests

use less ruby in tests and hopefully eliminating last place where 'Errno::EBADF: Bad file descriptor' happened.

UT run locally
Added rz files to top-level gitattributes. @mkristian could you verify the other bit?