Refactored Mix.Tasks.Local.Install to make it more explicit

In an attempt to resolve the first bug for #1585, I refactored this code a bit to make at more explicit; feel free to accept or refuse.