Bugfix: #6 used the correct variable to check for a lack of data\n Changed exit codes
Fix for python 2.6 compatibility in subprocess