Fix some warnings with recent version of Rust

This patch replaces `get()` calls with indexing for vectors and `str::from_utf8_lossy` with `String::from_ut8_lossy` to silence recent rustc warnings
I think somehow I got a warning about `use std::str;` being unused with `str::from_utf8(actual)`, not sure why.

But this last commit is obsolete after rebasing with the current master, so I've removed it completely.