Issue 8

This doesn't provide compliance with bitcoin v0.8.x but it does fix the thrown exception. I also added a some test scaffolding.