I remember problems with glob() not sure whether they are still present in php.