Fixed bug in directory recursion when access is denied