Issue #617: Reset index back to zero if indexOfSlash is less than zero.

Adds a unit test for the case where all parameters are empty.   The issue
where -9 is being returned seems to be a device specific issue, as the
indexOf source code from Android is correctly returning -1.

http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/java/lang/String.java.htm

The change here just adds a safety net around those JDKs that might be
returning something other than -1 for indexOf when something isn't found.