Add addpath and helpers, and use them to set $PATH.

This fixes duplicate entries appearing in $PATH.