Addresses several issues in #705

- 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.