More robust tests.  Also warn about missing 'realpath'.