Handle prepend/append_before_filter

Just as it says on the tin.