More adjustments:

- check for error code and bail out if not == 0
- use subprocess.call() for easier returncode retrieval
- Don't use shell=True as it's potentially dangerous