Moved the tests to a folder of its own and added CMake support.