Restrict matching of / in $filename to 2 occurrences