This can lead to some unexpected behavior because by default ts_tmp_dir is a full path. So expand the tmpdir when set.