[PATCH v3 06/10] scrrun: Move code to new helper function get_file_name().