adding some testing code. we use jasmie since it looks nice. This commit only includes a basic gradcheck but I hope to build on this foundation for more extensive tests of all library features in the future.