[ticket/12099] Clean some paths before using them

PHPBB3-12099
[ticket/12099] Clean paths in tests

PHPBB3-12099