Making sure the php directory exists before traversing it