use regexp-safe string operations in String#chomp

String#chomp was previously choking on:

```
"hello)".chomp(")")
```