Check exit status of system calls
Merge pull request #10 from iainrb/devel

Check exit status of system calls