The build wanted to create a Cargo.lock in the top-level source
directory (presumably because it is also a Cargo project), since we
were crating the lock file in sourceRoot (which was set to the example
project). This failed because the sources are read-only. Change the
test to create the lock file in the top-level crate directory, which
is Cargo's default behavior.
The test builds the PyO3 word_count example module using
maturinBuildHook. The motivation is to have a trivial test that does
not regress for reasons unrelated to maturin or hook updates.