Replace .bashrc PATH-setting code with simpler solution

This prevents trailing newlines from getting into PATH. pathadd function taken from
http://superuser.com/questions/39751/add-directory-to-path-if-its-not-already-there