add no_stdin option to cmd
another try to solve problem with jruby causing Errno::EBADF on close_write of popen opened with r+
increase Metrics/MethodLength to 20