Add unit tests. Rename tosac subdir to toscalib.