Added renderToFile($file)

I've added a method to render to file, because I wanted to use this in a non-browser environment. 

This avoids `header()` being called, and gets rid of the need to use output buffering to capture.