Use IOError instead of FileNotFoundError

http://parenchym.com/pymblog/new-exception-hierarchy-in-python-33.html
Create and remove temporary test file