Adjusted the script to write the output in a file.
Implemented the --interactive (or -i for short) option.

This option runs the script in interactive mode and prompts the user
before rewriting an existing file.
Updated the documentation.