Changed detection method for prerequisites

Changed file detection method for prerequisites to test by seeing if the
prerequisites can be instantiated.