Incorporated error handling along with some tests.
Merge pull request #3 from huntc/HtmlUnit-error-handling

Incorporated error handling along with some tests.