Added functions for md5, locate ref, getBAM.
Writes out commands to file and includes in provenance.