Added greater flexibility to subprocesses function - takes an iterable of strings or tuples.