Added "defaults" function to script environment

Utility function for ensuring default values are there.
Added support for config values to scripted items