Only match valid character separator in path resolution

This cause issues with Windows path where you have a drive name, e.g. C:/etc

Also fixed tests to work on top of expected environement. Some where running but weren't actually testing anything due to environement mis-configuration.

While testing for further bug on Windows, I also realised pr #442 was wrong as it walk up the three of every paths contained while it should only walk up the CWD path. This will need to be fixed too. I'll add a commit for this fix sometime this weekend probably.