Validate maxDepth argument in ScanDirectory() method.