Fix IO#lines deprecation warning for Ruby 2.0

When using Ruby 2.0, the following warning is issued:

```
IO#lines is deprecated; use #each_line instead
```

This PR changes `#lines` to `#each_line`.