Create and replace mix.exs file

You may be interested in reading the code we use for something similar: GitHub - bonfire-networks/mess: Simple, file-based dependency management with git and local overrides. · GitHub