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