b58encode: speedup.
Avoid exception on invalid script.
Merge pull request #30 from jtobey/abe-tweaks

Abe tweaks