hook: use fs write to improve testability
hook: use fs write to improve testability

tsuru/gandalf,tsuru/gandalf,scorphus/gandalf,gleez/gandalf,gleez/gandalf,flaviamissi/gandalf,marcelometal/gandalf,marcelometal/gandalf,scorphus/gandalf,flaviamissi/gandalf,marcelometal/gandalf,gleez/gandalf