Handle errors for non-existent directories in readdirRecursive()