Changing filter flow, alters on self, running the system command

Hello Paddy,

Thanks for the plugin, I spent this afternoon getting it to work how I wanted it to... the filter flow seemed odd to me, so I changed that a bit and added some other bits and bobs (I tried to make the commit messages detailed).

I have NO IDEA if you want any of this stuff.  I tried to make it as configurable as possible, but it expands the code.  Also I think I messed up your indenting.  This PR is mostly just informational in case you want any of the changes out of it.

Cheers!