Fix issue with trailing windows path separators

As commented in #8 add the windows separator and write a testcase for the scenario