Fixes #1025, spaces in id-to-taxonomy file break assignment with Mothur.

New pull request based on latest version of QIIME codebase.
Actually, it might be easier to just call `mothur_tax_file.flush()` before returning, that way the caller can safely open the file for reading again and `NamedTemporaryFile` can manage cleanup of the file when it's closed.