Fix memory leaks in test_bam_translate, test_rtrans_build

Close memory leaks in files specified by @jmarshall in response to #194.