Properly handle spaces in the pwd for autocomplete.