More useful error message when attempting on analyse a directory