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
In Python 2, it's theoretically wrong to call `.encode()` on a str. It will work so long as the string is pure ASCII, though, and I doubt there's any case where an OSError can be non-ascii.