filt: Use a filename-specific name of tempfile

Don't use "filt.tmp" for everything, it will be problematic if I should
run several at once.

4b3b86d2-95c3-11e3-8456-001f3b596ec9
filt: Use lockdir when processing each file

a4f63dc0-95c3-11e3-8aad-001f3b596ec9