[verb ます-stem] + 直す [noun] + を + 直す
直す after the ます-stem of a verb means doing the action again, this time properly: かきなおす書き直す is "rewrite", やりなおすやり直す "redo", かんがえなおす考え直す "rethink". On its own, 直す is the verb "fix", "correct".
The compound is a godan verb like 直す itself: かきなおした書き直した, かきなおさない書き直さない, かきなおします書き直します.
As a verb by itself, 直す means "fix", "repair" or "correct", and what you fix takes を. Its intransitive partner is なおる直る, "get fixed", where the thing takes が.
Curing an illness is written with a different kanji, なおす治す, read the same way: かぜ風邪をなおす治す.