refactor append_to_env_path into env_path(nil|:append|:prepend)