Add test infrastructure to expect failed command calls
Fix broken -f parameter parsing

Add test for the bug and filter usage in general, too