Add test to CharIO

@farcaller which one do you prefer:
```Rust
fn getc(&self) -> char {
  self.lastchar.get()
}
or:
```Rust
fn getc(&self) -> char {
  return self.lastchar.get();
}