So the typical unix approach for dealing with spaces in a path is to double quote the path:
EG: /dir1/dir2/”dir with spaces in it”/dir3
The second approach is to use the escape character ‘\’
EG: /dir1/dir2/dir\ with\ spaces\ in\ it/dir3
But, on a mac you need to use both approaches for the PATH to be set correctly.
EG: /dir1/dir2/”dir\ with\ spaces\ in\ it”/dir3