Remove usage of deprecated function

Remove usage of deprecated function setPattern() and replace with replacement function setPath().

I was not sure if we also want to rename the variables/arguments $pattern to $path inside silex. For now i haven't touched them.