The NormalizePath() function always added a trailing separator when
normalizing environment variables. Now it checks an environment
variable for a trailing separator and only adds one if it doesn't
already exist.
May be a partial fix for:
Fixes lp:1733217
https://bugs.launchpad.net/kicad/+bug/1733217
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.