PHP function to return a directory tree to an array.