Replare FileNotFoundError with IOError for python2 compatibility. (#1736)

http://legacy.python.org/dev/peps/pep-3151/