add a script for running unit tests and a test for issue #16, fixes #16