Add spec for File.basename and File.extname

Verifies the behavior when filenames have names with multibyte
characters.
Fix File.basename and File.extname

Makes sure we treat the strings here as all binary, since we only have
to search for direct matches and work with those. Prevents having to
convert back and forth to character vs. byte indexes all the time and we
already have the helpers for working with this byte based.

Fixes #2227