Merge pull request #1 from yaronkoren/master

Resynching fork with 2.0
Exit codes; Prevent infinite loops

Added exit code for shell script error handling; trimmed contents to
prevent infinite loops
Merge pull request #21 from jqnatividad/master

Exit codes; Prevent infinite loops