[ticket/11618] Replace glob() with scandir() and string matching

Removes glob from template tests as glob() does not work on all
systems according to PHP documentation as has been noticed by users.

PHPBB3-11618
Merge remote-tracking branch 'Hardolaf/ticket/11618' into develop-olympus

* Hardolaf/ticket/11618:
  [ticket/11618] Replace glob() with scandir() and string matching