Add a test to check for race conditions

(currently fails in dev mode when running 'go test -race')
Fix race condition when templates are recompiled on every request
Merge pull request #7 from vanackere/fix-race

Fix race condition when templates are recompiled on every request