pathes with path seperator correctly converted, pathIndex set to 1 when
path exists
version 0.2