Adds tests

Adds some rudimentary perl-based tests.