[tools] fix file creation mode, thanks rtz