Added permission checking to AppResource::Dir