Add maxdepth parameter to file.recurse state

Fixes #2788

Seems to be working great, but if anyone sees anything amiss, please tell me!  =)