Add a util function get_filename_from_path and its test.