Catch IOError in addition to the other errors being caught for each_frame

This should fix #14