Added .gitignore file
Fix: check for errors after calling php_stream_write()