Rename class to correct name
Using the class SplFileInfo and simplifying the use of exceptions