fix dig sig tests

The digital signature tests 24a, 29a, and 33a are failing to pass. This PR fixes some bugs to allow 24a and 29a to pass, but 33a will not be fixed.

See http://jira.webinos.org/browse/WP-582