Error handling, no more panics.
More descriptive error messages in two places.
Merge pull request #4 from lukevers/master

Error handling, no more panics.