Changes to stop overwriting of files when target files have changed inbetween runs.
Each stage works in own directory now, and once a bam is finished with gets
replaced with an empty file using the same name, should mean file order never gets
screwed up. Need to manually delete textfiles at end though...