18289 - Handle spaces in paths correctly

Fix previous commit to handle whitespace in paths