Check for errors and return codes.
Added README and .gitignore
Merge pull request #1 from hfiguiere/master

Some fixes