Allow running of actions on minibuffer input.

This relates to the issue #475. Upon further investigation, it was in
fact myself that introduced the bug when implementing commits in pull
request #472. The problem was that I used the hint function we pass in
to do the file path substitution. The problem with that was that we are
asking for some hints straight away so we can present them in the
minibuffer. As a side effect, we were trying to replace a file path in
the current buffer which happened to still be the file we were editing.

This commit allows us to pass in a function which will only fire when
the user tries to input something: not before the buffer is spawned (as
getHint does) as well.

The minibuffer functions could use some love, some are getting very cluttered.