[ticket/12589] Search directly in $directory if it's an absolute sub-path

https://tracker.phpbb.com/browse/PHPBB3-12589

PHPBB3-12589