Fix crash when package_add_command is missing.

When using packages promise and not defining 'package_add_command'
agent crashes. This fixes crash.
Merge pull request #2059 from pasinskim/master

Fix crash when package_add_command is missing.