Close a forgotten parenthesis
fix #46 : write detect if there is already ext

and write() is renamed write_file to avoid collusion with write::base