cd into bamfile dir to control tmp file generation