Work around python's os.execv exit behavior not returning error codes