core: CommandLine argument fails to fully capture strings with spaces

This is a spinout of a lingering issue detected when testing !2283 (merged).

The problem is that if a string with spaces is passed to a command line string variable, only the first substring before the whitespace will be saved in the string variable.

From Peter's suggestion here: