Refactor render() to fail when given a non-string filename

And write a test to prove it. I'm pretty sure the existing code base
just fails in this situation.

100% test coverage now. Whoop.