Add __dirname

Stops `Error: ENOENT, no such file or directory 'static/text.txt'` error.