Remove use of getElementsByTagName and getElementsByClassName

Replace calls to these functions with querySelector and querySelectorAll
Fix spec to throw error, ensuring a stack property

In Safari Mac 6.0.4 (and possibly other versions), a new error does
not have the stack property. Throwing the error and then catching it
ensures that the stack property has the correct value.

This fix gets the specs to run green in Safari.
Merge pull request #358 from sheelc/safari_exception_fix

Fix spec to throw error, ensuring a stack property
Merge pull request #369 from sheelc/query-selectors

Query selectors