bug fix on transaction generation

Pretty large bug fix, as the redeemScript was not being included in the initial transaction hex script it created. No funds would have been "lost".