Changed 'imageDirectories' into an array for glob() scanning purposes.