The internal utility get_sequence_len would make it's filename argument absolute so as to scan it's directory for files. Perform this on the directory instead so the filename can be const.