Better detection and error handling of MPI prerequisites