tests/embedded: improve version extraction

avoid troubles when the tarball name contains another instance of 'tar'