Create bai and md5 files, and save bed files

This (last part of the concatenation) should be a constant (and for insertions and deletions below) rather than a subst_ - no?