Preserve magic comments and content encoding of copied migrations.

During insertion of "# This migration comes from ... " comment at the beginning of
a migration, presence of magic comment was not considered.