Unit Tests

Added a few unit tests, which can be built with "make tests". Also
cleaned up the build process a bit, as git was removing an empty folder,
meaning that building the library would fail.