Replaced deprecated aliases of OSError.
Merge pull request #4 from guoci/master

Replaced deprecated aliases of OSError.