[PATCH 6/8] scrrun: Move code to new helper function get_file_name().