Addresses several issues in #704

- Avoids shell=True and hence any quoting issues
- Cleans up temporary directory

This code has not been run since FILTERS don't appear to be tested.
Don't bother creating temp directory unless it is needed
Merge pull request #707 from rogerbinns/issue-705

Addresses several issues in #705