Script: rename toScriptHash to getHash and add tests