handle new template flags system
fixed a reg expression to be coherent with the manual
fixed behavior of '-o' option and enhanced make_raw() code