Add testing infrastructure

Add the testing infrastructure using the TAP test format and the Perl prove
utility as the tests runner.