Use 'path-separator' for splitting/joining environment variables

This is more portable than current approach, which leads to errors in
windows, since it uses ':' in drive names and ';' to separate entries in
environment variables
Merge pull request #1905 from iqbalansari/master

Use 'path-separator' for splitting/joining environment variables