fixes problem when no scratch_dir is passed
added options to handle duplicate seq names