Added script to run unit tests.
Revised tests to make everything work on Mono.