[ticket/develop/11832] Fix path detection

Clean up path, do not count first /

PHPBB3-11832
Merge pull request #1703 from cyberalien/ticket/develop/11832

Fix path detection