Fixed intersect bug so that bed query with Bam DB correctly gives bed output. Added unit test.