Rename remove_duplicate_path_elements to deduplicate_path and make it generic.  Use it on other environment variables too.
Harden so that "set -u" can be used.  Add quotes and correct spacing.
If there is a local installation of golang, add it to $PATH.