Fix for SPC-665

Now, the event will be saved in the proper folder. Also, if there is no
events on defined, the file will be saved but the reference to the file
won't be added to eventconf.xml. If exist, it will be removed.