fix possible mem-leaks (when an error occurs w/curl)
make internal API call safe for external use (NULL check)
free() itself handles NULL check, no need to repeat it.
fix TOCTOU: file may change between stat() and fopen()
clarify 'default header' documentation
remove superfluous non-null checks.
add .gitignore file
v1.0.3