Fix matching for files within folders
if we had a string in the form /data/thingy.jpg the only match would be data because we did not took the folder separator into account