[Realtime] Move get_path_tail from sftp_client to utilities.