python subprocess stdout to file