Allow opening readonly files with mode==None
Merge pull request #399 from andrewcollette/issue_367

Allow opening readonly files with mode==None