Check if num_proc is None

Instead of relying on the truthiness of None, directly check for None
Change range(len()) to enumerate()
Check if a line in the input file is empty and ignore it
Write bytes to temp_file

Fixes Python 3 where string writing is no longer supported. Need to
check for regression in Python 2
Fix Python 3 function def doesn't allow tuple expansion

Tuples can't be expanded in function definitions in Python 3, so we have
to expand it in the function body.
Fix minor docs typo in run_cases.py