Potential fix for 'exec' failure case

 - Adding more robust code to handle the case where the exec call within fails. Now, spawn will raise an exception if this happens.
 - Adding a test to ensure this exception is raised when an invalid binary is run
I don't think you need to use the low-level `os.open` interface here - you should just be able to open a regular file object in binary mode - `with open(fullpath, 'wb') as f:`