Hey Dan,
We've talked about the fact that Keyboard Maestro's Execute a Shell Script action creates an unadulterated environment.
You clearly have made changes to your log-in shell environment that aren't reflected in Keyboard Maestro's shell environment.
Scope these out:
-Chris