[BUGFIX] Allow for alternative rootNode for getElementById

Fixes issue mentioned in #208 after merge.  Also adding npm-debug.log file to gitignore.