I am not sure, what bittcoin did here, it seems that bitcoin client just refused the logic of the script... I was asking how (which library, or manually) you used to assemble the tx... with the bitcoin client?
I am use nodejs module 'crypto' for hashing
https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencodingthis command
console.log(require('crypto').createHash("ripemd160").update('c47907abd2a80492ca9388b05c0e382518ff3960').digest('hex'))
print me 388756dc41f4eeadcb3fc5064535d1121a49d3f4
and I use nodejs-lib to compile script