Optimize env_prepend/append_path functions
Optimize env_prepend/append_path functions

Replace grep test with remove + add logic to prevent duplicates.
Because this approach does not need any external functions it's about 4
to 5 times faster then the original implementation.

Also added some error logging in case the provided path is not a valid
directory.

ellipsis/ellipsis