[server] improve seaf_dir_from_data and calc_last_modified