build: Check subprocess return codes

Pointed out (indirectly) by pylint's unused variable warning.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
build: Extract SRPM build logic into a function

Signed-off-by: Euan Harris <euan.harris@citrix.com>
build: Fix more pylint whitespace warnings

Signed-off-by: Euan Harris <euan.harris@citrix.com>
build: Fix pylint variable name warnings

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Merge pull request #25 from euanh/planexsc

Refactor build logic and fix more pylint warnings