Specifying open encoding does not work properly when open pragma is used with autodie

When using the open pragma with autodie, the encoding set in the open pragma is applied even when the user specifies an encoding in their call to open. Attached is a test case, which passes when autodie is not used.

I think this is related to the fix from #12.