Added functions to check for and remove invalid $PATH entries

Prompted by problem resolving git aliases.

See
    http://code.google.com/p/git-osx-installer/issues/detail?id=53
	http://stackoverflow.com/questions/7997700/git-aliases-causing-permission-denied-error