Missing closedir with opendir
Merge pull request #1522 from nghiaho12:latentsvm