BUG: fix scipy.io.mmread() of gzipped and bzip2ed files under Python3

fixes #2152
TST: test if fix for #2152 works
Merge pull request #3314 from andreas-h/gh2152

BUG: fix scipy.io.mmread() of gzipped files under Python3