Your plugin appears to be written for a very old version of Joomla! The event in current versions is onContentBeforeSave. You are also missing $context argument. It's a good idea to check for context to make sure that you're modifying the correct content type (e.g. article).
public function onContentBeforeSave($context, $article, $isNew)
if ($context !...
With Joomla core you need to setup a menu structure that will correspond to what you want to achieve with your URLs. Menus are important in Joomla.
From the example of the URLs in your question - it seems like you have created a menu item for the article1.
If you want all articles of that category (cat1) to be reachable under the cat1/article1,art2,art3 ...