Adjust access of directories under tmp
Fix segment fault problem when call print_granularity recursively by reallocation for next file path