rustpkg: Search RUST_PATH properly for dependencies, and add a test for ...

r? @metajack ...recursive dependencies

Closes #8524