Fixes #1416 -- replaced assertions with error checking in EC key from numbers.

Includes tests.