You can use qiime.util.qiime_open for this. It handles opening gzipped or not gzipped files, and does it based on the gzip magic number instead of file extension. So, just:

``jh = qiime_open(joined_fp)``