Add __dirname

Stops `Error: ENOENT, no such file or directory 'static/text.txt'` error.
Merge pull request #3 from RichardLitt/patch-1

Add __dirname