Consistently use with open() in all examples
Merge pull request #122 from mgedmin/patch-1

Consistently use with open() in all examples