Fix some encoding issues within Diff::LCS::Hunk

Using literal regular expressions / strings cause encoding issues in encoding schemes other than UTF-8, this is a workaround by trying to match literals into the same format as one of the expected diff components. It's not perfect (won't cope with multiple encoding schemes well) but it's enough to allow basic diffing of encoded strings (which is otherwise not possible).

Note the slightly odd testing style (using diff == expected rather than a matcher) is because this bug effects RSpec itself (which is how I discovered it).