minor template loading cleanup

- catch more than just TemplateNotFound (IOError raised on Windows)
- don't try empty template names