Fix partial fix: A slash in pos 0 still led to read access to pathname[-1].
Merge pull request #59 from FullName/path-idx-real-fix

Fix partial fix: A slash in pos 0 still led to read access to pathname[-1].