pipeline_idr.py Changes to writing of tempdir. Automatic sorting of bamfiles