Adding support for dynamic templatedirs

Q: Don't it ever stop?!
A: Not any time soon. Sorry ;)

I btw also noticed usecacheonfailure is statically set to true. Is there any reason for that? I find it actually pretty inconvenient while developing, so would like to propose to make that dynamic as well. Thoughts?