Fixes for getting package version

Older versions of Python's subprocess do not have capture_output, so
just get stdout directly.

Also pass the full path to cargo in case it is not on PATH.

Test: Run
Change-Id: I368e905a93b344bca6635c6ab7a60def809e88d5
1 file changed