Fixes failing test for JRuby

in JRuby FileUtils do not change
current dir when moving files
Merge pull request #13105 from arunagw/jruby-gen-test-fix

Fixes failing test for JRuby