know your libraries ;-)

strrpos fails in cases the file in the path has no dot but the parent folder

backport #1566 to stable45

summoning reviewers again @karlitschek @schiesbn @georgehrke @butonic THX