This commit updates the tests to check that this works and also rewrites the test script from Bash to Perl. Co-authored-by: Dave Rolsky <autarch@urth.org>