Many programs notify me that "grep/sed/uname/... not found"; some run, some don't. My system(?) path is damaged, how do I go about a diagnosing it?
Your question is unclear as it seems to ask several things. However the issue re launching from the Dock can be answered.

The Dock does not call a shell. .profile and other startup scripts are only run when Terminal.app or similar starts a shell or you run a shell script via launchd etc.

To change the path used for Apps launched from the Dock, Finder or other GUI then you need to change the path your Workspace uses this is in ~/.MacOSX/environment.plist 
e.g. mine is

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;WAFDIR&lt;/key&gt;
  &lt;string&gt;/Users/mark/src/third_party/git-svn/waf&lt;/string&gt;

  &lt;key&gt;PATH&lt;/key&gt;
  &lt;string&gt;/Users/mark/bin:/Users/mark/env/bin:/Users/mark/usr/local/bin:/usr/local/bin:/opt/local/bin:/usr/local/git/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/libexec/binutils:&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Also have a look at this question.