add tree function

Make functionality closer to that in Linux. Add tree (-t) option.