[FIX] Fixes path implementation

Fixes issues with Windows paths separators
and incorrect handling of leading slashes in
linux paths.

Change-Id: I3c78bf50a9307f4da4895dd64f2e15c62d4933a6
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/2009
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
Reviewed-by: Damla Durmaz <ddurmaz88@gmail.com>
Reviewed-by: Holger Schmeisky <google@schmeisky.com>