Added some API unit tests

Included some unit tests that can be proved using 'make test' for the
package instead of having a non-standard test script.