Fix test clause for directory. Refs #2958