use subprocess instead of os.system, make scp return code exactly.