Fixed the code for closing all remaining open files for pytables versions < 3.1.0