Added tests for SafeSubstring

Added tests to validate the index and length parameters of the underlying Substring.