Fixed chai bindings so that now they work with CommonJS; added tests