Tried alternative foreach syntax for scandir

Gonna see if it works