The RecursiveDirectoryIterator is much more elegant than using the *dir() functions by hand