Added tests and made grape.js compatible with node