These path manipulations are happening several times in the code- I recommend creating a utility function to separate out this functionality in order to reduce duplicate code and allow it to be easily unit-tested.

See ```qiime.util.add_filename_suffix``` for an example.