Avoid indexing &str to be compatible with current rust master

Indexing &str has been removed from rust, instead we have to treat the
string as &[u8] using as_bytes() and index into that array.
Merge pull request #8 from dotdash/no_str_indexing

Avoid indexing &str to be compatible with current rust master