Skip tests when dependencies are not present

The code was trying to do this, but was not quite successfully; now
the tests really do skip, without error, if a dependency is missing.