added a check in the Route::replacePatterns method to abort on missing path property