Added karma tests
Fixed call to createHTMLDocument for Firefox 19..
Merge pull request #3 from Versal/karma-tests

Karma tests