add ‘recursive’ option to prevent search descending into subdirectories

would rather this just be a for loop.