Add needs_run() method for checking if modules needs to run for a
session or scan