Add npm package/gruntfile for automated testing.
Add tests for Detector.