Use binary mode for open()
Use an actual working dict merge procedure
Add explicit optional IPv6 support