new script API

fixes https://github.com/bitpay/bitcore/issues/602
Agree, fail early