Add support for new 'procedure' definition

I chose name entity.name.bgscript to match the ‘event’ callback
definition.  Is this correct?
Merge pull request #1 from duppypro/master

Add support for new 'procedure' definition