Update Router.php

Fixed issue where parts of routes were being matched as parameters when they shouldn't have been.