Ensure we only try to run ag.el on valid directories (see discussion in #1)