Use os.uname() instead of calling uname in subprocess

Related-Bug: #1291535

Change-Id: I57e18c0b95904f318e3fff08cd18b32e28f48834
Merge "Use os.uname() instead of calling uname in subprocess"