Alternatively, use
Sigil, or
calibre's
Edit Book, also free tools, that instead of unpacking the book and requiring you to use a text editor, incorporate their own editor, handle links automatically, and come with a multitude of other useful tools and helpers.