Added an update mode to the script.

If the update option for the target database set to `true` the script
will generate queries that use the `ON DUPLICATE KEY UPDATE` feature
of MySQL.