Switch tests to use rustpkg

Rustpkg always returns an exit code of 0, so we have to add a little
perl hack to get it to fail correctly.