tree export_graphviz: remove unused close parameter and close the file if out_file is a string