Only update path if dir is present
Use array of path elements