[mod] more py3 fixes
[mod] py3 needs 'w*b*' in open, m(