implements add_dir and unlink_dir events

also updates the tests

@paulmillr could you please review and provide feedback