ENH: allow to_html and to_latex to take a file name as their first argument