BUG: Fix support for builds in dirs with whitespace

Enables POSIX mode in shlex.shlex to support quotes and whitespacing.

Closes #4382.