Fix: Ensure rake task correctly identifies directories with specs in them

It was returning files in the spec/ folder
Merge branch 'rake_task_incorrectly_identifies_directories'

[Closes #753]