rbm fails at properly archiving nested submodules

rbm fails at properly archiving (and thus building) projects with nested submodules. That's only partly due to missing --recursive arguments. Interestingly, it seems $path is wrong in that case as well, which we use in

            ($stdout, $stderr, $success, $exit_code)
                = capture_exec('git', 'submodule', 'foreach',
                    "git archive --prefix=$project-$version/\$path/"
                    . " --output=$tmpdir/submodule.tar \$sha1;"
                    . "tar -Af \"$dest_dir/$tar_file\" $tmpdir/submodule.tar");
            exit_error 'Error running git archive on submodules.' unless $success;

I've attached a script where one can see that pretty well.archive.sh

For testing (and the project I've been wrestling with) see our Metrics website:

https://gitlab.torproject.org/tpo/network-health/metrics/website

For the first two submodules the path matches the directory actually entered. For the last one it does not. src/submods/metrics-lib/src/build gets entered but path is src/build. Moreover, given that the first one is src/build as well the last submodule actually clobbers what we already archived at the begin, which leads to weird errors during build. :)