Add an option to set the template directory. Closes #17.