Added directory depth (handles paths better).