Return directory path with a trailing DS.

Fix #45 .
What about removing the `substr` condition and `return rtrim($path, DS) . DS`? In this case, we deal with `/foo//////` also. Thoughts?