Fix $errno

Removed the closing PHP tag and fixed the non existant $errno variable
Merge pull request #1 from djekl/master

Fix $errno