CMS-4066 Implement ScriptService using Nashorn. Added error handling.