fix encoding for expected result
cleaning up a bit

This file seems quite okay actually, it's got a nasty monkey-patch at
the top but it needs to be there to get access to SEEK_CUR.