simplify iterating through arglist
un-indent shebang for test executables
better emulate `ruby -S` behavior in testing

Per https://github.com/ruby/ruby/blob/7d3db3c/ruby.c#L1383-1391