MPI/Install.pm: check for existence of key first

Change the order of the test to ensure we don't accidentally create
the key if it doesn't already exist.