Use argument list for sh instead of string

Faster, more portable and less error prone since no shell expansion.
Merge pull request #8088 from cirosantilli/sh-str-to-args

Use argument list for sh instead of string