My first commit
changed two samtools command from system to exec since pipes were not working
inelegant hack for samtools problem