Add gitignore
Use __DIR__
Remove unused var
Fix XSS security hole
Merge pull request #1 from JeroenDeDauw/master

A number of improvements