Adding tests for filtered replication.

Fixing binlog parsing.