Build PATH from list of directories

Only if a directory exists is it added to the PATH.