Fix some posix assumptions related to running shell commands.

This is a resubmit of r223548, which was reverted due to breaking
tests on Linux and Mac.

This resubmit fixes the reason for the revert by adding back some
accidentally removed code which appends -c to the command line
when running /bin/sh.

This resubmit also differs from the original patch in that it sets
the architecture on the ProcessLaunchInfo.  A follow-up patch will
refactor this to separate the logic for different platforms.

Differential Revision: http://reviews.llvm.org/D6553

Reviewed By: Greg Clayton

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@223695 91177308-0d34-0410-b5e6-96231b3b80d8
Fix platform shell test to run "dir c:\" instead of "ls /" on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@223700 91177308-0d34-0410-b5e6-96231b3b80d8