Fix some posix assumptions related to running shell commands.

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

Reviewed By: Greg Clayton